# to open/create a new html file in the write mode 
f = open('index.html', 'w') 

# the html code which will go in the file GFG.html 
html_template = """<html> 
<head> 
<title>What?</title> 
</head> 
<body> 
<h2>Welcome</h2> 

<p>Default code has been loaded into the Editor.</p> 

</body> 
</html> 
"""

# writing the code into the file 
f.write(html_template) 

# close the file 
f.close() 
